Hello, |
Re: automate linking
Hello,
#include <utils/linkops.dxl>
pragma runLim, 0
void childObject(Object currObj, Object cobj)
{
Object childObj
for childObj in all currObj do
{
if (cell childObj || row childObj || isDeleted childObj) continue
int Error = linkErrorNoError
if(childObj."_Req Type" "" == "ASW/HW - Both Application Software and Hardware" || childObj."_Req Type" "" == "ASW - Application Software")
{
Error=createLink_(childObj,"/CNPE - Project/implied by",cobj)
if (Error!=linkErrorNoError) {reportLinkError_(childObj,cobj,"/CNPE - Project/implied by","",Error)}
}
childObject(childObj, cobj)
}
}
Object cobj = current
Object obj = parent(current Object)
Folder fol
Module m = current Module
fol = getParentFolder (m)
addLinkModuleDescriptor (fol, fullName(m), fullName(m), false, true, "/CNPE - Project/implied by", "")
setLinkModuleDescriptorsExclusive(fol, module(m), true)
childObject(obj,cobj)
|
Re: automate linking
I think you need to define "parent requirement" more precisely. Below, are you saying that Req 1 is the "parent" of all the Req 2, Req 3, Req 4, Req 5? If there were a 3.2.1.1 Req 6, would it have Req 1 as it's parent as well, or Req 2/3 instead?
Section 3.2 Main Heading
description of this section
req 1 Requirement text
Section 3.2.1 Sub Heading
description of this section
req 2 Requirement text
req 3 Requrement Text
Section 3.2.1.1 Sub-Sub Heading
description of this section
req 6 Requirement text
Section 3.2.2 Sub Heading
description of this section
req 4 Requirement text
req 5 Requirement text
|